home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / hypercar / hamradio / extra23.sit / Extra Ham Test / background_4685.txt < prev    next >
Encoding:
Text File  |  1991-04-09  |  9.2 KB  |  403 lines

  1. -- background: 4685 from stack: in
  2. -- bmap block id: 4997
  3. -- flags: 0000
  4. -- background id: 0
  5. -- name: Test
  6. ----- HyperTalk script -----
  7. On openCard
  8.   global questans, questkey, rightone, group
  9.   hide field review
  10.   hide background button "Correct!"
  11.   set hilight of background button A to false
  12.   set hilight of background button B to false
  13.   set hilight of background button C to false
  14.   set hilight of background button D to false
  15.   get the number of card
  16.   -- ΓÇóΓÇóΓÇó choose question # or card # option
  17.   -- put "Question #" & group into field "Q#" -- question # option
  18.   put "Question #"&it-2 into field "Q#" -- card # option
  19.   put rightone into item group of questkey
  20.   put item group of questans into foo
  21.   if foo is not empty then set hilight of background button foo to true
  22. end openCard
  23.  
  24. on closeCard
  25.   set lockScreen to true
  26.   set hilight of background button A to false
  27.   set hilight of background button B to false
  28.   set hilight of background button C to false
  29.   set hilight of background button D to false
  30.   set lockScreen to false
  31.   hide background button "Correct!"
  32. end closeCard
  33.  
  34. on idle
  35.   global time1
  36.   -- comment out next line (exit idle) if you want a time limit on test.
  37.   -- don't forget to set time limit as described in Exam button of
  38.   -- first card.
  39.   exit idle
  40.   put the seconds into time2
  41.   if time2<time1 then exit idle
  42.   if time2ΓëÑtime1 then
  43.     answer "Too much Time. Try again?" with "OK" or "Quit"
  44.   end if
  45.   if it is "OK" then
  46.     visual effect dissolve to black
  47.     visual effect iris open
  48.     go first card
  49.     openStack
  50.   else
  51.     visual effect dissolve
  52.     go home
  53.   end if
  54. end idle
  55.  
  56. on randomNext
  57.   global group,questlist
  58.   add one to group
  59.   if group > 30 then go card report
  60.   get item group of questlist
  61.   go card it
  62. end randomNext
  63.  
  64. on randomPrev
  65.   global group,questlist
  66.   subtract one from group
  67.   if group < 1 then go first card
  68.   get item group of questlist
  69.   go card it
  70. end randomPrev
  71.  
  72. on reView
  73.   global rightone, immediate
  74.   put "Correct answer is " & rightone into field review
  75.   if not immediate then
  76.     wait 3 seconds
  77.     show field review
  78.     wait until the mouseClick
  79.   else
  80.     if hilite of background button rightone is false then
  81.       show field review
  82.       wait until the mouseClick
  83.     else
  84.       -- show background button "Correct!"
  85.     end if
  86.   end if
  87. end reView
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110. -- part 1 (field)
  111. -- low flags: 00
  112. -- high flags: 0000
  113. -- rect: left=16 top=68 right=136 bottom=500
  114. -- title width / last selected line: 0
  115. -- icon id / first selected line: 0 / 0
  116. -- text alignment: 0
  117. -- font id: 3
  118. -- text size: 10
  119. -- style flags: 0
  120. -- line height: 13
  121. -- part name: Q1
  122.  
  123.  
  124. -- part 11 (field)
  125. -- low flags: 00
  126. -- high flags: 0000
  127. -- rect: left=48 top=137 right=177 bottom=499
  128. -- title width / last selected line: 0
  129. -- icon id / first selected line: 0 / 0
  130. -- text alignment: 0
  131. -- font id: 3
  132. -- text size: 10
  133. -- style flags: 0
  134. -- line height: 13
  135. -- part name: D
  136.  
  137.  
  138. -- part 25 (button)
  139. -- low flags: 00
  140. -- high flags: 0000
  141. -- rect: left=204 top=313 right=342 bottom=241
  142. -- title width / last selected line: 0
  143. -- icon id / first selected line: 902 / 902
  144. -- text alignment: 1
  145. -- font id: 0
  146. -- text size: 12
  147. -- style flags: 0
  148. -- line height: 16
  149. -- part name: Prev
  150. ----- HyperTalk script -----
  151. on mouseUp
  152.   -- ΓÇóΓÇóΓÇóComment out last command & uncomment next to last for sequential
  153.   -- cards.  Comment out next to last and uncomment last command for
  154.   -- random cards from buildList (in background of first card of stack).
  155.   global immediate, group, questans
  156.   if visible of field review is false then
  157.     if item group of questans is not empty then
  158.       if immediate then reView
  159.     end if
  160.   end if
  161.   hide field review
  162.   visual effect wipe right fast to black
  163.   visual effect wipe left
  164.   go to previous card  -- ΓÇóΓÇóΓÇó for sequential cards
  165.   -- randomPrev -- ΓÇóΓÇóΓÇó for randomly-generated cards from buildList
  166. end mouseUp
  167.  
  168.  
  169. -- part 26 (button)
  170. -- low flags: 00
  171. -- high flags: 0000
  172. -- rect: left=297 top=313 right=342 bottom=333
  173. -- title width / last selected line: 0
  174. -- icon id / first selected line: 26425 / 26425
  175. -- text alignment: 1
  176. -- font id: 0
  177. -- text size: 12
  178. -- style flags: 0
  179. -- line height: 16
  180. -- part name: Next
  181. ----- HyperTalk script -----
  182. on mouseUp
  183.   -- ΓÇóΓÇóΓÇóComment out last command & uncomment next to last for sequential
  184.   -- cards.  Comment out next to last and uncomment last command for
  185.   -- random cards from buildList (in background of first card of stack).
  186.   global immediate, group, questans
  187.   if visible of field review is false then
  188.     if item group of questans is not empty then
  189.       if immediate then reView
  190.     end if
  191.   end if
  192.   hide field review
  193.   visual effect wipe left fast to black
  194.   visual effect wipe right fast
  195.   go to next card -- ΓÇóΓÇóΓÇó for sequential cards
  196.   -- randomNext -- ΓÇóΓÇóΓÇó for randomly-generated cards from buildList
  197. end mouseUp
  198.  
  199.  
  200.  
  201. -- part 27 (field)
  202. -- low flags: 00
  203. -- high flags: 0000
  204. -- rect: left=48 top=178 right=219 bottom=508
  205. -- title width / last selected line: 0
  206. -- icon id / first selected line: 0 / 0
  207. -- text alignment: 0
  208. -- font id: 3
  209. -- text size: 10
  210. -- style flags: 0
  211. -- line height: 13
  212. -- part name: D
  213.  
  214.  
  215. -- part 28 (field)
  216. -- low flags: 00
  217. -- high flags: 0000
  218. -- rect: left=48 top=221 right=262 bottom=508
  219. -- title width / last selected line: 0
  220. -- icon id / first selected line: 0 / 0
  221. -- text alignment: 0
  222. -- font id: 3
  223. -- text size: 10
  224. -- style flags: 0
  225. -- line height: 13
  226. -- part name: D
  227.  
  228.  
  229. -- part 29 (field)
  230. -- low flags: 00
  231. -- high flags: 0000
  232. -- rect: left=47 top=264 right=306 bottom=502
  233. -- title width / last selected line: 0
  234. -- icon id / first selected line: 0 / 0
  235. -- text alignment: 0
  236. -- font id: 3
  237. -- text size: 10
  238. -- style flags: 0
  239. -- line height: 13
  240. -- part name: D
  241.  
  242.  
  243. -- part 20 (field)
  244. -- low flags: 00
  245. -- high flags: 0004
  246. -- rect: left=15 top=31 right=53 bottom=166
  247. -- title width / last selected line: 0
  248. -- icon id / first selected line: 0 / 0
  249. -- text alignment: 0
  250. -- font id: 0
  251. -- text size: 12
  252. -- style flags: 0
  253. -- line height: 16
  254. -- part name: Q#
  255. ----- HyperTalk script -----
  256.  
  257.  
  258.  
  259.  
  260. -- part 36 (button)
  261. -- low flags: 00
  262. -- high flags: 0000
  263. -- rect: left=368 top=305 right=342 bottom=406
  264. -- title width / last selected line: 0
  265. -- icon id / first selected line: 21700 / 21700
  266. -- text alignment: 1
  267. -- font id: 0
  268. -- text size: 12
  269. -- style flags: 0
  270. -- line height: 16
  271. -- part name: Home
  272. ----- HyperTalk script -----
  273. on mouseUp
  274.   visual effect iris close
  275.   go home
  276. end mouseUp
  277.  
  278.  
  279.  
  280.  
  281. -- part 38 (button)
  282. -- low flags: 80
  283. -- high flags: 8002
  284. -- rect: left=173 top=116 right=138 bottom=245
  285. -- title width / last selected line: 0
  286. -- icon id / first selected line: 0 / 0
  287. -- text alignment: 1
  288. -- font id: 0
  289. -- text size: 12
  290. -- style flags: 0
  291. -- line height: 16
  292. -- part name: Correct!
  293.  
  294.  
  295. -- part 39 (button)
  296. -- low flags: 00
  297. -- high flags: 8005
  298. -- rect: left=14 top=138 right=174 bottom=44
  299. -- title width / last selected line: 0
  300. -- icon id / first selected line: 0 / 0
  301. -- text alignment: 1
  302. -- font id: 0
  303. -- text size: 12
  304. -- style flags: 0
  305. -- line height: 16
  306. -- part name: A
  307. ----- HyperTalk script -----
  308. on mouseUp
  309.   global questans, group
  310.   set hilight of background button A to true
  311.   set hilight of background button B to false
  312.   set hilight of background button C to false
  313.   set hilight of background button D to false
  314.   put "A" into item group of questans
  315. end mouseUp
  316.  
  317.  
  318.  
  319. -- part 40 (button)
  320. -- low flags: 00
  321. -- high flags: 8005
  322. -- rect: left=14 top=178 right=214 bottom=44
  323. -- title width / last selected line: 0
  324. -- icon id / first selected line: 0 / 0
  325. -- text alignment: 1
  326. -- font id: 0
  327. -- text size: 12
  328. -- style flags: 0
  329. -- line height: 16
  330. -- part name: B
  331. ----- HyperTalk script -----
  332. on mouseUp
  333.   global questans, group
  334.   set hilight of background button A to false
  335.   set hilight of background button B to true
  336.   set hilight of background button C to false
  337.   set hilight of background button D to false
  338.   put "B" into item group of questans
  339. end mouseUp
  340.  
  341.  
  342.  
  343. -- part 41 (button)
  344. -- low flags: 00
  345. -- high flags: 8005
  346. -- rect: left=14 top=219 right=255 bottom=44
  347. -- title width / last selected line: 0
  348. -- icon id / first selected line: 0 / 0
  349. -- text alignment: 1
  350. -- font id: 0
  351. -- text size: 12
  352. -- style flags: 0
  353. -- line height: 16
  354. -- part name: C
  355. ----- HyperTalk script -----
  356. on mouseUp
  357.   global questans, group
  358.   set hilight of background button A to false
  359.   set hilight of background button B to false
  360.   set hilight of background button C to true
  361.   set hilight of background button D to false
  362.   put "C" into item group of questans
  363. end mouseUp
  364.  
  365.  
  366.  
  367. -- part 42 (button)
  368. -- low flags: 00
  369. -- high flags: 8005
  370. -- rect: left=14 top=264 right=300 bottom=44
  371. -- title width / last selected line: 0
  372. -- icon id / first selected line: 0 / 0
  373. -- text alignment: 1
  374. -- font id: 0
  375. -- text size: 12
  376. -- style flags: 0
  377. -- line height: 16
  378. -- part name: D
  379. ----- HyperTalk script -----
  380. on mouseUp
  381.   global questans, group
  382.   set hilight of background button A to false
  383.   set hilight of background button B to false
  384.   set hilight of background button C to false
  385.   set hilight of background button D to true
  386.   put "D" into item group of questans
  387. end mouseUp
  388.  
  389.  
  390.  
  391. -- part 43 (field)
  392. -- low flags: 81
  393. -- high flags: 0004
  394. -- rect: left=339 top=119 right=137 bottom=498
  395. -- title width / last selected line: 0
  396. -- icon id / first selected line: 0 / 0
  397. -- text alignment: 0
  398. -- font id: 3
  399. -- text size: 12
  400. -- style flags: 256
  401. -- line height: 16
  402. -- part name: review
  403.